import Vue from 'vue';
import 'amfe-flexible';
import 'normalize.css';
import {
  Button,
  Cell,
  CellGroup,
  Image,
  Icon,
  Lazyload,
  NavBar,
  Toast,
  Tabs,
  Tab,
  List,
  Collapse,
  CollapseItem,
  ActionSheet,
  Popup,
  RadioGroup,
  Radio,
  Sticky,
  Dialog,
  Field,
  Uploader,
  Swipe,
  SwipeItem,
  PullRefresh,
  ShareSheet,
  Grid,
  GridItem,
  Stepper,
  Area,
  Loading
} from 'vant';
Vue.use(Lazyload).use(Button).use(Cell).use(CellGroup).use(Image).use(Icon).use(NavBar).use(Toast).use(Tab).use(Tabs)
  .use(List).use(
    Collapse).use(CollapseItem).use(ActionSheet).use(Popup).use(RadioGroup).use(Radio).use(Sticky).use(Dialog).use(
    Field).use(Uploader).use(Swipe).use(SwipeItem).use(PullRefresh).use(ShareSheet).use(Grid).use(GridItem).use(Stepper)
  .use(Area).use(Loading);

Vue.config.productionTip = false;

window.addEventListener('load', () => {
  sessionStorage.setItem('isRouting', 0);
  let indexPath = sessionStorage.getItem('indexPath');
  if(!indexPath){
    sessionStorage.setItem('indexPath', window.location.pathname);
  }
});
export const instance = (App) => new Vue({
  render: h => h(App)
}).$mount('#app');
